package com.levy.contronller.javase.designModel.observer;

import java.util.Observable;
import java.util.Observer;

/**
 * 观察者
 * Created by levy on 2018/8/7.
 */
public class MyObserver implements Observer {


    @Override
    public void update(Observable o, Object arg) {
        Person person = (Person) o;
        System.out.println(person);

        System.out.println("对象发生变化");

    }
}
